const path = require('path')
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
    mode:'development',
    devServer: {
        static: path.resolve(__dirname, '../dist'),//运行代码目录  webpack4使用contentBase webpack5使用static
        compress: true,//启动gzip压缩
        port: 9000,//端口号
        open: true,//自动打开浏览器
        hot: true,//开启HMR功能 webpack4
    },
    target: "web",
    plugins: [
        new CleanWebpackPlugin()
    ],
}